# 字典套娃
"""
dict1_list = [{1:'a',2:'b',3:'c'},{4:'d',5:'e',6:'f',7:'g'}]

for i in range(dict1_list):
    print(i,end=',')
print()
"""

# 混合多维列表的遍历
"""
list1 = [1,1,1,1,[2,2,2,2,2,2],[3,3,3,3,3,3]]

for i in range(len(list1)):
    if isinstance(list1[i],list):
        for j in range(len(list1[i])):
            print(list1[i][j],end=',')
    else:
        print(list1[i],end=',')
"""
# 混合多维元组的遍历
"""
tuple1 = (1,1,1,1,1,1,(2,2,2,2,2,2),(3,3,3,3,3,3))

for i in range(len(tuple1)):
    if isinstance(tuple1[i],tuple):
        for j in range(len(tuple1[i])):
            print(tuple1[i][j],end=',')
    else:
        print(tuple1[i],end=',')
print()
"""
# 混合多元字典的遍历__________字典不能嵌套，key不能变，value可以变
"""
dict1 = {1:'a',2:'b',3:'c'}
print(dict1.get(1))
print(dict1.get(4,0))
print(dict1)
"""
# 浅拷贝
import copy
list1 = [1,2,2,2,2]
list2 = list1.copy()
list2.append(3)
print(list1,list2)
